package com.sv.jm.baselibrary.utils;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**
 * Created by 胡金辉 on 2017/5/24.
 */

public class GsonHelper {
    static GsonHelper instance = null;
    private Gson gson = null;

    public static GsonHelper getInstance() {
        if (null == instance) {
            synchronized (GsonHelper.class) {
                instance = new GsonHelper();
            }
        }
        return instance;
    }

    private GsonHelper() {
        gson = new GsonBuilder().serializeNulls().create();
    }

    public Gson getGson() {
        return gson;
    }
}
